# 作者: 宇
# 2025年02月21日20时31分50秒

class Animal:
    def __init__(self,name):
        self.name=name

    def  eat(self):
        print('eat')
    def drink(self):
        print('deikn')
    def run(self):
        print('run')
    def sleep(self):
        print('sleep')

class Dog(Animal):
    def __init__(self,name,color):
        super().__init__(name)
        self.color=color
    def bark(self):
        print('bark')

class Cat(Animal):
    def jump(self):
        print("jump")

class xiaotianquan(Dog):
    def fly(self):
        print("fly")
    def bark(self):
        super().bark() #调用父类的bark
        print("像神一样叫")

if __name__ == '__main__':
    # wangacai=Dog()
    # wangacai.eat()
    # wangacai.drink()
    # xiaotianquan=xiaotianquan()
    # xiaotianquan.bark()
    dog=Dog("大黄","黄色")
    print(dog.name)

